package com.zhy.http.okhttp.cookie;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.net.HttpCookie;

public class SerializableHttpCookie
  implements Serializable
{
  private static final long serialVersionUID = 6374381323722046732L;
  private transient HttpCookie clientCookie;
  private final transient HttpCookie cookie;

  public SerializableHttpCookie(HttpCookie paramHttpCookie)
  {
    this.cookie = paramHttpCookie;
  }

  private void readObject(ObjectInputStream paramObjectInputStream)
    throws IOException, ClassNotFoundException
  {
    this.clientCookie = new HttpCookie((String)paramObjectInputStream.readObject(), (String)paramObjectInputStream.readObject());
    this.clientCookie.setComment((String)paramObjectInputStream.readObject());
    this.clientCookie.setCommentURL((String)paramObjectInputStream.readObject());
    this.clientCookie.setDomain((String)paramObjectInputStream.readObject());
    this.clientCookie.setMaxAge(paramObjectInputStream.readLong());
    this.clientCookie.setPath((String)paramObjectInputStream.readObject());
    this.clientCookie.setPortlist((String)paramObjectInputStream.readObject());
    this.clientCookie.setVersion(paramObjectInputStream.readInt());
    this.clientCookie.setSecure(paramObjectInputStream.readBoolean());
    this.clientCookie.setDiscard(paramObjectInputStream.readBoolean());
  }

  private void writeObject(ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    paramObjectOutputStream.writeObject(this.cookie.getName());
    paramObjectOutputStream.writeObject(this.cookie.getValue());
    paramObjectOutputStream.writeObject(this.cookie.getComment());
    paramObjectOutputStream.writeObject(this.cookie.getCommentURL());
    paramObjectOutputStream.writeObject(this.cookie.getDomain());
    paramObjectOutputStream.writeLong(this.cookie.getMaxAge());
    paramObjectOutputStream.writeObject(this.cookie.getPath());
    paramObjectOutputStream.writeObject(this.cookie.getPortlist());
    paramObjectOutputStream.writeInt(this.cookie.getVersion());
    paramObjectOutputStream.writeBoolean(this.cookie.getSecure());
    paramObjectOutputStream.writeBoolean(this.cookie.getDiscard());
  }

  public HttpCookie getCookie()
  {
    HttpCookie localHttpCookie = this.cookie;
    if (this.clientCookie != null)
      localHttpCookie = this.clientCookie;
    return localHttpCookie;
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.zhy.http.okhttp.cookie.SerializableHttpCookie
 * JD-Core Version:    0.6.2
 */